package managers;

import java.sql.SQLException;
import java.util.List;

import stores.TeremStore;
import stores.TeremStoreImpl;
import workspace.Workspace;
import beans.Terem;

public class TeremManagerImpl implements TeremManager {

	private TeremStore teremStore = new TeremStoreImpl();

	@Override
	public List<Terem> loadTeremLista(Workspace workspace) throws SQLException {
		return teremStore.loadTeremLista(workspace);
	}

	@Override
	public Terem insertTerem(Workspace workspace, Terem newTerem)
			throws SQLException {
		return teremStore.insertTerem(workspace, newTerem);
	}

	@Override
	public Terem updateTerem(Workspace workspace, Terem updatedTerem)
			throws SQLException {
		return teremStore.updateTerem(workspace, updatedTerem);
	}

	@Override
	public boolean deleteTerem(Workspace workspace, long userId)
			throws SQLException {
		return teremStore.deleteTerem(workspace, userId);
	}

	@Override
	public boolean deleteTeremForTest(Workspace workspace, long userId)
			throws SQLException {
		return teremStore.deleteTeremForTest(workspace, userId);
	}

}
